package com.copm.ifm.base.basic.pojo.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.copm.ifm.base.basic.pojo.BaseTree;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 包含用户所有信息VO对象
 *
 * @author zzf
 * @date 2020/12/22 16:54
 */
@Getter
@Setter
@ToString
public class SysStaffAllVO implements Serializable {

    private Long id;

    @ApiModelProperty("租户id")
    private Long tenantId;

    @ApiModelProperty("类型 [1普通员工 2项目管理员 3租户管理员 4超级管理员]")
    private Integer type;

    @ApiModelProperty("登录凭证")
    private String accessToken;

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("登录名")
    private String username;

    @ApiModelProperty("手机")
    private String phone;

    @ApiModelProperty("语言 [1简体中文 2繁体中文 3英文]")
    private Integer language;

    @ApiModelProperty("主题id")
    private Long themeId;

    @ApiModelProperty("默认项目")
    private Long defaultProjectId;

    @ApiModelProperty("标准工时费用")
    private BigDecimal stdCost;

    @ApiModelProperty("员工对应企业组织架构节点ID")
    private Long orgTenantId;

    @ApiModelProperty("是否开启消息弹框和提示音")
    private Integer openedMessage;

    @JsonIgnore
    @ApiModelProperty("菜单集合")
    private List<Menu> menuList;

    @ApiModelProperty("项目过期集合")
    private List<String> projectOverdueList;

    @ApiModelProperty("动态菜单列表")
    private BaseTreeVO dynamicMenu;

    @Getter
    @Setter
    public static class Menu extends BaseTree {

        @ApiModelProperty("路径")
        private String url;

        @ApiModelProperty("图标路径")
        private String iconUrl;

        @TableField(typeHandler = JacksonTypeHandler.class)
        @ApiModelProperty("操作权限key数组")
        private List<String> operations;

    }
}
